/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.pretorius.question3.srp.service.impl;

import java.math.BigDecimal;
import za.ac.cput.pretorius.question3.srp.service.CalculatorService;

/**
 *
 * @author griddy
 */
public class CalculatorServiceImpl implements CalculatorService {

   
    @Override
    public BigDecimal add(BigDecimal one, BigDecimal two) {
        return one.add(two);
    }

    @Override
    public BigDecimal devide(BigDecimal one, BigDecimal two) {
        if(two.equals(BigDecimal.valueOf(0)))
            return null;
        else
            return one.divide(two);
    }

    @Override
    public BigDecimal multiply(BigDecimal one, BigDecimal two) {
        return one.multiply(two);
    }

    @Override
    public BigDecimal subtract(BigDecimal one, BigDecimal two) {
        return one.subtract(two);
    }
    
}
